﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ImvuCacheViewer
{
    public partial class StatusForm : Form
    {
        public StatusForm()
        {
            InitializeComponent();
        }

        private int _count;
        public int Count {
            get { return _count; }
            set { 
                progressBar1.Minimum = 1;
                _count = value;
                if (value == 0) return;
                lblCount.Text = "of " + _count + " cached files";
                lblCount.Refresh();
                progressBar1.Maximum = _count;
            }
        }

        private int _number;
        public int Number {
            get { return _number; }
            set { 
                _number = value;
                if (_number < progressBar1.Minimum) return;
                if (_number >= progressBar1.Maximum) return;
                progressBar1.Value = _number;
                progressBar1.Refresh();
                lblNumber.Text = _number.ToString();
                lblNumber.Refresh();
            }
        }
    }
}
